package field

type (
	CSQ    GSM // 设备的GSM 信号强度，取值范围[0,31]
	CSQRaw GSMRaw
)

func (csq CSQ) Raw() CSQRaw {
	return CSQRaw(GSM(csq).Raw())
}

func (csq CSQRaw) Type() (CSQ, error) {
	gsm, err := GSMRaw(csq).Type()
	if err != nil {
		return CSQ(0), nil
	}

	return CSQ(gsm), nil
}

func (csq CSQRaw) Slice() []byte {
	return csq[:]
}
